package cn.edu.cimv.service.impl;

import cn.edu.cimv.dao.entity.Notices;
import cn.edu.cimv.dao.mapper.NoticesMapper;
import cn.edu.cimv.service.NoticesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 门铎 on 2016/6/27.
 */
@Service
public class NoticesServiceImpl implements NoticesService {
    @Autowired private NoticesMapper noticesMapper;
    @Override
    public void editNotices(Notices notices) {
        noticesMapper.insertNotices(notices);
    }

    @Override
    public List<Notices> queryNotices() {
        return noticesMapper.queryNotices();
    }

    @Override
    public void deleteNotices(int id) {
        noticesMapper.deleteNotices(id);
    }

    @Override
    public Notices queryNoticesById(int id) {
        return noticesMapper.queryNoticesById(id);
    }

    @Override
    public void updateNotices(Notices notices) {
        noticesMapper.updateNotices(notices);
    }
}
